// --------------------------------------------------------------------------------------------------------------------
// <copyright company="Jarno Burger / Dennis de Bruijn" file="JPluginExtendedInfoStruct.cs">
//   Jarno Burger / Dennis de Bruijn
// </copyright>
// <summary>
//   
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace ManagedFreeFrame.Struct
{
    using System;
    using System.Runtime.InteropServices;

    /// <summary>
    /// Information on the plugin.
    /// 
    /// FreeFrame PluginMinorVersion numbers should always have 3 digits 
    /// - so divide the minor version number by 1000 and add the major version number to get the full version number. 
    /// Example: 0.751 APIMajorVersion=0, APIMinorVersion=751 
    /// </summary>
    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
    // ReSharper disable MemberCanBeInternal
    // ReSharper disable FieldCanBeMadeReadOnly.Global
    // ReSharper disable MemberCanBePrivate.Global
    public struct PluginExtendedInfoStruct
    {
        /// <summary>
        ///   32-bit unsigned integer
        ///   Represents number before decimal point in version numbers.
        /// </summary>
        [MarshalAs(UnmanagedType.U4)]
        public uint PluginMajorVersion;

        /// <summary>
        ///   32-bit unsigned integer
        ///   Represents number after decimal point in version numbers.
        /// </summary>
        [MarshalAs(UnmanagedType.U4)]
        public uint PluginMinorVersion;

        /// <summary>
        ///   32-bit pointer to <see langword="null"/> terminated string
        ///   A description of the plugin - intended to be made available to the user in hosts supporting this function via the user interface. 
        ///   Pointer value can be 0 if not provided by plugin!
        /// </summary>
        public IntPtr Description;

        /// <summary>
        ///   32-bit pointer to <see langword="null"/> terminated string
        ///   Author and license information. Pointer value can be 0 if not provided by plugin!
        /// </summary>
        public IntPtr About;

        /// <summary>
        ///   32-bit unsigned integer
        ///   Size in bytes of the <see cref="FreeFrameExtendedDataBlock"/> - or 0 if not provided by plugin
        /// </summary>
        [MarshalAs(UnmanagedType.U4)]
        public uint FreeFrameExtendedDataSize;

        /// <summary>
        ///   32-bit pointer to a FreeFrame ExtendedDataBlock - 
        ///   this interface is not  yet in use, 
        ///   but provided to allow the FreeFrame project to establish an
        ///   extended data block format in the future. 
        ///   Please do not use until a data format has been agreed.
        /// </summary>
        public readonly IntPtr FreeFrameExtendedDataBlock;

    }
    // ReSharper restore MemberCanBePrivate.Global
    // ReSharper restore FieldCanBeMadeReadOnly.Global
    // ReSharper restore MemberCanBeInternal
}